<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

Route::get('/', function () {
    return view('welcome');
});

//博客文章路由
Route::get('/blog', 'BlogController@index')->name('blog');

Route::resource('blog', 'BlogController');

Route::post('markdown','BlogController@markdown')->name('markdown');

Route::get('/register',function(){
	return view('auth.register');
});
Route::get('/login',function(){
	return view('auth.login');
});

// 认证路由...
Route::get('auth/login', 'Auth\AuthController@getLogin');
Route::post('auth/login', 'Auth\AuthController@postLogin');
Route::get('auth/logout', 'Auth\AuthController@getLogout');
// 注册路由...
Route::get('auth/register', 'Auth\AuthController@getRegister');
Route::post('auth/register', 'Auth\AuthController@postRegister');
//无限极分类
Route::resource('category','CateController');
//购物车列表
Route::resource('addcart','CartController');
//购物车移除和清空
Route::controller('yichu','AddCartController');
//相册
Route::resource('albums','AlbumsController');
//执行上传照片
Route::post('/photos/store','PhotosController@store');
//照片
Route::resource('photos','PhotosController');
//用户列表
Route::get('user','UserController@find');
//验证
Route::get('cat','CatpchaController@cat');


